import './App.css';
// 引入counterStore
import { useStore } from './store'
// 引入mobx中间件
import { observer } from 'mobx-react-lite'

function App() {
  const { counterStore, listStore } = useStore()
  return (
    <div className="App">
      <h3>{ counterStore.count }</h3>
      <h3>{listStore.filterList.join('-')}</h3>
      <button onClick={counterStore.addCount}>新增Count</button>
      <button onClick={() => listStore.addList(9)}>新增list</button>
    </div>
  );
}

// 中间件包括App
export default observer(App)
